package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriterStringDemo {
    public static void main(String[] args) throws IOException {

        FileOutputStream fos = new FileOutputStream("./demo.txt");

        String str = "爱你不归的模样";
        byte[] data = str.getBytes(StandardCharsets.UTF_8);
        fos.write(data);
        System.out.println("完成");
        fos.close();
    }
}
